import request from "@/utils/request";

// 获取文章分类
export const getArticleCategoryList = () => request.get('/articleCategory/queryPage', {
	params: {
		pageSize: 99999
	}
})
// 添加文章分类
export const addArticleCategory = data => request.post('/articleCategory/add', data)
// 编辑文章分类
export const editArticleCategory = data => request.put('/articleCategory/edit', data)
// 删除文章分类
export const delArticleCategory = id => request.delete('/articleCategory/remove/' + id)
// 获取文章
export const queryArticleList = params => request.get('/article/queryPage', {params})
// 上传图片
export const uploadImage = formData => request.post('/file/upload', formData, {
	headers: {
		'Content-Type': 'multipart/form-data'
	}
})
// 添加文章
export const addArticle = data => request.post('/article/add', data)
// 编辑文章
export const editArticle = data => request.put('/article/edit', data)
// 删除文章
export const delArticle = id => request.delete('/article/remove/' + id)
// 文章详情
export const getArticleDetail = id => request.get('/article/query/' + id)